import request from "@/utils/request"

 //  获取所有权限点
export function getAllpermission() {
    return request({
        url:"/sys/permission"
    })
}

//添加权限点
export function addpermission(data) {
    return request({
        url: "/sys/permission",
        method: 'POST',
        data
    })
}

// 根据ID获取权限点详情
export function seekPer(id) {
    return request({
        url: `/sys/permission/${id}`,
        method: 'get',
    })
}

//根据ID更新权限点详情
export function updatePer(data) {
    return request({
        url: `/sys/permission/${data.id}`,
        method: 'PUT',
        data
    })
}

// 根据id删除权限点
export function delPer(id) {
    return request({
        url: `/sys/permission/${id}`,
        method: 'delete',
    })
}